import request from '@/utils/request'

// 查询商品供应商对应信息列表
export function listGoodsSupplier(query) {
  return request({
    url: '/goods/goodsSupplier/list',
    method: 'post',
    data: query
  })
}


// 查询商品供应商对应信息详细
export function getGoodsSupplier(id) {
  return request({
    url: '/goods/goodsSupplier/' + id,
    method: 'get'
  })
}

// 查询商品供应商对应信息详细
export function getGoodsSupplierBySupplierId(id) {
  return request({
    url: '/goods/goodsSupplier/getGoodsSupplierBySupplierId/' + id,
    method: 'get'
  })
}

// 新增商品供应商对应信息
export function addGoodsSupplier(data) {
  return request({
    url: '/goods/goodsSupplier/add',
    method: 'post',
    data: data
  })
}

// 编辑商品供应商对应信息
export function editGoodsSupplier(data) {
  return request({
    url: '/goods/goodsSupplier/editGoodsSupplier',
    method: 'post',
    data: data
  })
}

// 修改商品供应商对应信息
export function updateGoodsSupplier(data) {
  return request({
    url: '/goods/goodsSupplier/update',
    method: 'post',
    data: data
  })
}

// 采购新增查询商品信息列表
export function listGoodsSupplierBySupplierId(query) {
  return request({
    url: '/goods/goodsSupplier/listGoodsSupplierBySupplierId',
    method: 'post',
    data: query
  })
}

// 删除商品供应商对应信息
export function delGoodsSupplier(id) {
  return request({
    url: '/goods/goodsSupplier/delete/' + id,
    method: 'post'
  })
}
/* // 启用
export function enableGoodsSupplier(id) {
  return request({
    url: '/goods/goods/enable/' + id,
    method: 'post'
  })
}
// 停用
export function disableGoodsSupplier(id) {
  return request({
    url: '/goods/goods/disable/' + id,
    method: 'post'
  })
} */
